package com.zwps.common.api.model.vo;

import java.util.List;

import com.zwps.common.tool.tree.Trees;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

@Schema(description = "树")
@Getter
@Setter
public class TreeVO<K, D> extends Trees<K, D, TreeVO<K, D>> {

    @Schema(description = "ID")    
    private K id;

    @Schema(description = "上级ID")
    private K parentId;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "排序值")
    private Integer sort;

    @Schema(description = "原始数据")
    private D data;

    @Schema(description = "子集")
    private List<TreeVO<K, D>> children;

}
